import os
import sys
import io
import datetime

class compute():
    def __init__(self):
        self.script = ""
        self.operate = ""
        self.paras = []
    #判断等于某一特定值
    def is_equal_value(self,paraValue1,compareValue = 1):
        if paraValue1 == compareValue:
            return True
        return False
    #判断大于某一特定值
    def is_greater_value(self,paraValue1,compareValue = 0):
        if paraValue1 > compareValue:
            return True
        return False
    #判断小于等于某一特定值
    def is_less_equal_value(self,paraValue1,compareValue = 0):
        if paraValue1 <= compareValue:
            return True
        return False
    
    def is_less_value(self,paraValue1,compareValue = 0):
        if paraValue1 < compareValue:
            return True
        return False
    #判断大于等于某一特定值
    def is_greater_equal_value(self,paraValue1,compareValue = 0):
        if paraValue1 >= compareValue:
            return True
        return False
    #获取某一特定值
    def get_para_value(self,paraValue1):
        return paraValue1
    #相减处理
    def process_minus(self,paraValue1,paraValue2):
        return paraValue1 - paraValue2
    def process_divide(self,paraValue1,paraValue2):
        return paraValue1/float(paraValue2)
    
    def operate_compute(self):
        if self.operate =="大于":
            if len(self.paras) == 1:
                return self.is_greater_value(self.paras[0])
            elif len(self.paras) == 2:
                return self.is_greater_value(self.paras[0],self.paras[1])
            else:
                return False
        elif self.operate =="大于等于":
            if len(self.paras) == 1:
                return self.is_greater_equal_value(self.paras[0])
            elif len(self.paras) == 2:
                return self.is_greater_equal_value(self.paras[0],self.paras[1])
            else:
                return False
        elif self.operate =="等于":
            if len(self.paras) == 1:
                return self.is_equal_value(self.paras[0])
            elif len(self.paras) == 2:
                return self.is_equal_value(self.paras[0],self.paras[1])
            else:
                return False
        elif self.operate =="相减":
            if len(self.paras) == 2:
                return self.process_minus(self.paras[0],self.paras[1])
            else:
                return False
        elif self.operate =="相除":
            if len(self.paras) == 2:
                return self.process_divide(self.paras[0],self.paras[1])
            else:
                return False
        elif self.operate =="小于等于":
            if len(self.paras) == 1:
                return self.is_less_equal_value(self.paras[0])
            elif len(self.paras) == 2:
                return self.is_less_equal_value(self.paras[0],self.paras[1])
            else:
                return False
        elif self.operate =="小于":
            if len(self.paras) == 1:
                return self.is_less_value(self.paras[0])
            elif len(self.paras) == 2:
                return self.is_less_value(self.paras[0],self.paras[1])
            else:
                return False
        return "erro is working"


class load_para_logic():
    def __init__(self):
        self.is_load_para = "suceess"
        self.file_content = []
        try:
            with open("template.conf","r") as fr:
                for line in fr:
                    values = line.strip("\n").split("@")
        except Exception:
            self.is_load_para = "fail"
    


class process_label():
    def __init__(self):
        self.script = ""
        self.operate = ""
        self.
        self.paras = []
    def operate_compute(self):
        if 

